package billeterie;

public class TicketsFactory 
{
	public static Ticket getTickets(Show s)
	{
		Ticket newTicket = null;
		
		String className = s.getClass().getSimpleName();

		if(className.equals("ShowA"))
		{
			newTicket = new TicketA(s);
		}
		else if(className.equals("ShowB"))
		{
			newTicket = new TicketB(s);
		}
		else if(className.equals("ShowC"))
		{
			newTicket = new TicketC(s);
		}

		return newTicket;
	}
	
}
